package com.pany.domain.models;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.Session;
import org.hibernate.annotations.Generated;

import com.google.gson.Gson;

import play.db.jpa.GenericModel;
import play.db.jpa.JPABase;

@Entity
@Table(name = "t_vip")
public class VIPInfo extends GenericModel
{
    @Id
    @Column(updatable = false)
    private String vipId;
    
    private String vipName;
    
    private String passwd;
    
    private String realName;
    
    private String sex;
    
    private int age;
    
    private String phoneNumber;
    
    private String email;
    
    private String address;
    
    private Double balance;
    
    private Timestamp createTime;
    
    private int level;
    
    private String remark;
    
    @Transient
    private String sexName;
    
    @Transient
    private String levelName;
    
    public VIPInfo()
    {
        super();
        // TODO Auto-generated constructor stub
    }
    
    public VIPInfo(String vipId, String vipName, String passwd, String realName, String sex, int age,
        String phoneNumber, String email, String address, Double balance, Timestamp createTime, int level, String remark)
    {
        super();
        this.vipId = vipId;
        this.vipName = vipName;
        this.passwd = passwd;
        this.realName = realName;
        this.sex = sex;
        this.age = age;
        this.phoneNumber = phoneNumber;
        this.email = email;
        this.address = address;
        this.balance = balance;
        this.createTime = createTime;
        this.level = level;
        this.remark = remark;
    }
    
    /**
     * @return the vipId
     */
    public String getVipId()
    {
        return vipId;
    }
    
    /**
     * @param vipId the vipId to set
     */
    public void setVipId(String vipId)
    {
        this.vipId = vipId;
    }
    
    /**
     * @return the vipName
     */
    public String getVipName()
    {
        return vipName;
    }
    
    /**
     * @return the passwd
     */
    public String getPasswd()
    {
        return passwd;
    }
    
    /**
     * @param passwd the passwd to set
     */
    public void setPasswd(String passwd)
    {
        this.passwd = passwd;
    }
    
    /**
     * @param vipName the vipName to set
     */
    public void setVipName(String vipName)
    {
        this.vipName = vipName;
    }
    
    /**
     * @return the realName
     */
    public String getRealName()
    {
        return realName;
    }
    
    /**
     * @param realName the realName to set
     */
    public void setRealName(String realName)
    {
        this.realName = realName;
    }
    
    /**
     * @return the sex
     */
    public String getSex()
    {
        return sex;
    }
    
    /**
     * @param sex the sex to set
     */
    public void setSex(String sex)
    {
        this.sex = sex;
    }
    
    /**
     * @return the age
     */
    public int getAge()
    {
        return age;
    }
    
    /**
     * @param age the age to set
     */
    public void setAge(int age)
    {
        this.age = age;
    }
    
    /**
     * @return the phoneNumber
     */
    public String getPhoneNumber()
    {
        return phoneNumber;
    }
    
    /**
     * @param phoneNumber the phoneNumber to set
     */
    public void setPhoneNumber(String phoneNumber)
    {
        this.phoneNumber = phoneNumber;
    }
    
    /**
     * @return the email
     */
    public String getEmail()
    {
        return email;
    }
    
    /**
     * @param email the email to set
     */
    public void setEmail(String email)
    {
        this.email = email;
    }
    
    /**
     * @return the address
     */
    public String getAddress()
    {
        return address;
    }
    
    /**
     * @param address the address to set
     */
    public void setAddress(String address)
    {
        this.address = address;
    }
    
    /**
     * @return the balance
     */
    public Double getBalance()
    {
        return balance;
    }
    
    /**
     * @param balance the balance to set
     */
    public void setBalance(Double balance)
    {
        this.balance = balance;
    }
    
    /**
     * @return the createTime
     */
    public Timestamp getCreateTime()
    {
        return createTime;
    }
    
    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Timestamp createTime)
    {
        this.createTime = createTime;
    }
    
    /**
     * @return the level
     */
    public int getLevel()
    {
        return level;
    }
    
    /**
     * @param level the level to set
     */
    public void setLevel(int level)
    {
        this.level = level;
    }
    
    /**
     * @return the remark
     */
    public String getRemark()
    {
        return remark;
    }
    
    /**
     * @param remark the remark to set
     */
    public void setRemark(String remark)
    {
        this.remark = remark;
    }
    
    public static void main(String[] args)
    {
        VIPInfo info = new VIPInfo();
        info.setAddress("1");
        info.setAge(1);
        info.setBalance((double)0);
        info.setCreateTime(new Timestamp(new Date().getTime()));
        info.setRemark("  aa");
        info.setEmail("aaa");
        info.setLevel(1);
        info.setPasswd("aaaa");
        info.setPhoneNumber("111");
        info.setRealName("aaa");
        info.setSex("aaa");
        info.setVipId("aaaa");
        info.setVipName("aaa");
        Gson g = new Gson();
        System.out.println(g.toJson(info));
    }
    
    public String getLevelName()
    {
        return levelName;
    }
    
    public void setLevelName(String levelName)
    {
        this.levelName = levelName;
    }
    
    public String getSexName()
    {
        return sexName;
    }
    
    public void setSexName(String sexName)
    {
        this.sexName = sexName;
    }
}
